<?php include( "templates/include/header.php" );
  include( "templates/include/adminHeader.php" );?>

      <div id="adminHeader">
        <h2>Administation des R&eacute;sultats</h2>
        <p>Vous &ecirc;tes connect&eacute; en tant que <b><?php echo htmlspecialchars( $_SESSION['username']) ?></b>. <a href="admin.php?action=logout"?>Se D&eacute;connecter</a></p>
      </div>

      <h1>Tous les R&eacute;sultats</h1>

<?php if ( isset( $results['errorMessage'] ) ) { ?>
        <div class="errorMessage"><?php echo $results['errorMessage'] ?></div>
<?php } ?>


<?php if ( isset( $results['statusMessage'] ) ) { ?>
        <div class="statusMessage"><?php echo $results['statusMessage'] ?></div>
<?php } ?>


  <table align="center" width="90%" cellpadding="5px" cellspacing="0" border="0">
    <?php foreach ( $results['season'] as $season ) { ?>
      <tr onclick="location='admin.php?action=editSeason&amp;seasonId=<?php echo $season->id?>'" height="230px">
        <td width="300px" style="margin:0;padding:0" align="center">
          <?php echo( $season->title ); ?>
        </td>
      </tr>
    <?php } ?>
  </table>

      <p><?php echo $results['totalRows']?> article<?php echo ( $results['totalRows'] != 1 ) ? 's' : '' ?> au total.</p>

      <p><a href="admin.php?action=newSeason">Ajouter une Saison</a></p>

<?php
  include( "templates/include/adminFooter.php" );
  include( "templates/include/footer.php" ); ?>
